home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ MSO2K Folders 2.xpl < prev    next >
Text File  |  2001-09-01  |  2KB  |  78 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="4"
  3. "COUNT"="4"
  4. "UIPATH 1"="System\File System\Folders\Data"
  5. "UIPATH 2"="Program Options\Microsoft Office\MS Office 2000\Data Folders"
  6. "NAME"="Office 2000 Folders #2"
  7. "VERSION"="1.15"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Word Files Dir"
  10. "TEXT 2"="PowerPoint Dir"
  11. "TEXT 3"="Publisher Dir"
  12. "TEXT 4"="Publisher Pic. Dir"
  13. "DESCRIPTION 1"="With this plug-in, you can change the default path for your files. When set, the program will use the configured folder as default for the file requester."
  14. "DESCRIPTION 2"="Please exit all Office programs before changing these settings."
  15. "AUTHOR"="Xteq Systems"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"=" "
  19.  
  20.  
  21. sP="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Common\General\"
  22.  
  23. 'STR W9x - xSTR WNT
  24. sWWD="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Word\Options\DOC-PATH"
  25. sPPT="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\PowerPoint\RecentFolderList\Default"
  26. sPUB1="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Publisher\Doc_Path"
  27. sPUB2="HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\9.0\Publisher\Picture_Path"
  28.  
  29. sPCheck="HKCU\Software\Microsoft\Office\9.0\"
  30. Sub Plugin_Initialize 
  31. if RegPathExists(sPCheck) then
  32.   s=RegReadValue(sWWD)
  33.   SetUIElement 1,s
  34.  
  35.   s=RegReadValue(sPPT)
  36.   SetUIElement 2,s
  37.  
  38.   s=RegReadValue(sPUB1)
  39.   SetUIElement 3,s
  40.  
  41.   s=RegReadValue(sPUB2)
  42.   SetUIElement 4,s
  43. else
  44.   Disable
  45. end if
  46. End Sub
  47.  
  48. Sub Plugin_CheckData(ElementIndex)
  49. End Sub
  50.  
  51. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  52.  Call Wrt(1,sWWD)
  53.  Call Wrt(2,sPPT)
  54.  Call Wrt(3,sPUB1)
  55.  Call Wrt(4,sPUB2)
  56.  
  57.  Call Logoff()
  58. End Sub
  59.  
  60.  
  61. Sub Wrt(ITM,VAL)
  62.  s=GetUIElement(ITM)
  63.  if len(s)>0 then 
  64.   
  65.     if Right(s,1)="\" then
  66.        s=left(s,len(s)-1)
  67.     end if
  68.     Call RegWriteValue(VAL,s,1)
  69.  else
  70.     s=RegReadValue(VAL)
  71.     if IsEmpty(s)=false then Call RegDeleteValue(VAL)
  72.  end if
  73. end sub
  74.  
  75.  
  76. Sub Plugin_Terminate 
  77. End Sub
  78.